﻿CREATE VIEW [dbo].[UserStorageInfosLatestOverall] AS
SELECT cast('99999999-9999-9999-9999-999999999999' as uniqueidentifier) as [InstanceId]
      ,current_timestamp as [Submission]
      ,sum([AppFoldersSize]) as [AppFoldersSize]
      ,sum([BackupSize]) as [BackupSize]
      ,sum([OperatingSystemSize]) as [OperatingSystemSize]
      ,sum([SharedFoldersSize]) as [SharedFoldersSize]
      ,sum([SharedFoldersDupSize]) as [SharedFoldersDupSize]
      ,sum([StorageFreeSpace]) as [StorageFreeSpace]
      ,sum([StorageSize]) as [StorageSize]
      ,sum([StorageUsedSpace]) as [StorageUsedSpace]
  FROM [UserStorageInfosLatest]
  WHERE [InstanceId]!='99999999-9999-9999-9999-999999999999'
